<!DOCTYPE html>
<!--[if IE 9]>         <html class="no-js lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
    <head>
         <#include "../static/top.ftl" >
         
        
    </head>
    <body>
        <!-- Page Wrapper -->
        <!-- In the PHP version you can set the following options from inc/config file -->
        <!--
            Available classes:

            'page-loading'      enables page preloader
        -->
        <div id="page-wrapper">
            <!-- Preloader -->
            <!-- Preloader functionality (initialized in js/app.js) - pageLoading() -->
            <!-- Used only if page preloader is enabled from inc/config (PHP version) or the class 'page-loading' is added in #page-wrapper element (HTML version) -->
            <div class="preloader themed-background">
                <h1 class="push-top-bottom text-light text-center"><strong>Pro</strong>UI</h1>
                <div class="inner">
                    <h3 class="text-light visible-lt-ie10"><strong>Loading..</strong></h3>
                    <div class="preloader-spinner hidden-lt-ie10"></div>
                </div>
            </div>
           
            <div id="page-container" class="sidebar-partial sidebar-visible-lg sidebar-no-animations">
               

                 <#include "../static/menu.ftl" >
                
                
                
                <!-- Main Container -->
                <div id="main-container">
                   
                    
                    
                    
                    <#include "../static/header.ftl" >
                    
                    
                    <!-- END Header -->

                    <!-- Page content -->
                    <div id="page-content">
                       
                        
                        <div class="content-header">
		                   	<h4 style="padding-left: 20px;  padding-right: 20px;">Dashboard&nbsp;&nbsp;&nbsp;<#include "../static/search.ftl" ></h4>
		                </div>
		                
		                <ul class="breadcrumb breadcrumb-top">
		                    <li>Home</li>
		                    <li><a href="#">Personal Info</a></li>
		                </ul>
                        
                        
                        
                        
                        
                        
                        
                        <!-- END Dashboard Header -->
                        
                   
                        
                       <div class="row">
                       
                       <div class="block">
                            <!-- Block Title -->
                            <div class="block-title">
                                <h2><strong>Personal</strong> Info</h2>
                                
                            </div>
                            <!-- END Block Title -->

	                        <div class="block-content" >
	                        <form class="form-horizontal" onsubmit="return false;">
                    <div class="form-group">

                        <label class="col-md-3 control-label">Username</label>

                        <div class="col-md-9">

                            <input id="e_user" class="form-control" value="${username}" type="text"
                                   placeholder="Disabled input here..." disabled="">


                        </div>

                    </div>
                    <div class="form-group">

                        <label class="col-md-3 control-label">Email:</label>
                        <div class="col-md-9">

                            <input id="e_email" type="text" placeholder="" class="form-control" value="${email}">

                        </div>

                    </div>
                    <div class="form-group">

                        <label class="col-md-3 control-label">Tel:</label>
                        <div class="col-md-9">

                            <input id="e_tel" type="text" placeholder="" class="form-control" value="${phone_number}">

                        </div>
                    </div>
                    <div class="form-actions">

                       
						<button type="button" id="btn_update" class="btn btn-primary">Save</button>
                    <#--<button type="button" class="btn">Cancel</button>-->

                    </div>
                </form>
	                        
	                        </div>
							
						</div>
                        </div>
                       
                     
                        
                       		
                
                       
                      

                       
                    <!-- END Page Content -->
                    </div>
                    <!-- Footer -->
                    <#include "../static/corp.ftl" >
                    <!-- END Footer -->

                <!-- END Main Container -->
            </div>
            <!-- END Page Container -->
        </div>
       
        <a href="#" id="to-top"><i class="fa fa-angle-double-up"></i></a>

     
         <#include "../static/footer.ftl" >
       <script type="text/javascript" src="/res1/js/jquery.pulsate.min.js"></script>
         <script>
      $(".sidebar-nav a").each(function () {
            $(this).removeClass('active');
      });
      $('#menu5').addClass('active open');
      $("#sub5").show();
      $('#menu5-1').addClass(' active');


    $('#btn_update').click(function (event) {
        var e_user = $("#e_user").val();
        var e_email = $("#e_email").val();
        var e_tel = $("#e_tel").val();
        var e_pass1 = $("#e_pass1").val();
        var e_pass2 = $("#e_pass2").val();
        if (e_pass1 != e_pass2) {
            layer.msg("The password input is inconsistent");
        } else {
            $.post('/service/user/update', {
                username: e_user,
                password: e_pass2,
                phone_number: e_tel,
                email: e_email
            }, function (data) {
                if (data.code =='suc') {
                    layer.msg("update success");
                } else {
                    layer.msg("update fail")
                }
            });
        }
    });
   
         </script>
    </body>
</html>